4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe4,:_lx_atExe5
 - result _lx_atExe1 size: 4015, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	7.1.2022 	14:39:57 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 24, send count: 4, loop count: 3, bytes sent 391968 / -84092 remaining, total send time 54 µs. 	7.1.2022 	14:39:58 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 939 bytes ***. 	7.1.2022 	14:42:48 	lx 	(5. Tcp Server 2)

closing socket '77'. 	7.1.2022 	14:42:48 	lx 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe4,:_lx_atExe5
 - result _lx_atExe1 size: 4015, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	7.1.2022 	14:42:52 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 25, send count: 4, loop count: 3, bytes sent 326640 / -18522 remaining, total send time 202 µs. 	7.1.2022 	14:42:53 	lx 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe4,:_lx_atExe5
 - result _lx_atExe1 size: 4015, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	7.1.2022 	14:45:21 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 26, send count: 3, loop count: 2, bytes sent 326640 / -16446 remaining, total send time 151 µs. 	7.1.2022 	14:45:21 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 941 bytes ***. 	7.1.2022 	14:46:45 	lx 	(5. Tcp Server 2)

closing socket '77'. 	7.1.2022 	14:46:45 	lx 	(5. Tcp Server 2)

*** tcp close for sock 72, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	7.1.2022 	14:49:35 	lx 	(5. Tcp Server 2)

closing socket '72'. 	7.1.2022 	14:49:35 	lx 	(5. Tcp Server 2)

*** tcp close for sock 73, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	7.1.2022 	14:49:35 	lx 	(5. Tcp Server 2)

closing socket '73'. 	7.1.2022 	14:49:35 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          26
poll.fd_count:        0
pollCount:            2244912
pollInCount:          37
pollOutCount:         0
pollCloseCount:       11
pollErrCount:         0
fd add/remove count:  13/13
totalBytesReceived:   24872
totalBytesSent:       1726150. 	7.1.2022 	14:49:35 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	7.1.2022 	14:49:35 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x012de54110. 	7.1.2022 	14:49:35 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	7.1.2022 	14:50:03 	lx 	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	7.1.2022 	14:50:03 	lx 	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	7.1.2022 	14:50:03 	lx 	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	7.1.2022 	14:50:03 	lx 	(1. Application process)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	7.1.2022 	14:50:03 	lx 	(1. Application process)

  database connect time: 0.0004 seconds. 	7.1.2022 	14:50:03 	lx 	(1. Application process)

* connect: connection changed to 'postgre-demo/fi_demo'. 	7.1.2022 	14:50:03 	lx 	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	7.1.2022 	14:50:03 	lx 	(1. Application process)

* preference 'system/nc_server_start.json', organization '0' was loaded from database 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	7.1.2022 	14:50:03 	lx 	(1. Application process)

error: preference 'system/nc_server_start.json' was not found
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:553: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/dprf.lua:466: in function 'preferenceFromJson'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:44: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:27>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:70: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:19>]
. 	7.1.2022 	14:50:03 	lx 	(1. Application process)

Tcp server 2 starting. 	7.1.2022 	14:50:03 	_lx_SERVER 	(5. Tcp Server 2)

Field has not been translated: [Product]Reserved. 	7.1.2022 	14:50:03 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Product]Fixed. 	7.1.2022 	14:50:03 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Product]Available. 	7.1.2022 	14:50:03 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Work_Phase_Actual]Previous_Track_Time. 	7.1.2022 	14:50:03 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Work_Order_Schedule]Can_Be_Manufactured. 	7.1.2022 	14:50:03 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Work_Order_Schedule]Manufacturing_State. 	7.1.2022 	14:50:03 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

  database connect time: 0.0002 seconds. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0173cc6770, size: 400. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/4d.json. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

--- server started in 0.0021 seconds, 2022-01-07 14:50:05, used memory 2998.5 kb --- 	 5. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	7.1.2022 	14:50:05 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-07 14:50:35
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 674
Content-Uncompressed-Length: 890

LZ4. 	7.1.2022 	14:50:35 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	7.1.2022 	14:50:35 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	7.1.2022 	14:50:35 	lx 	(5. Tcp Server 2)

  database connect time: 0.0002 seconds. 	7.1.2022 	14:50:35 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	7.1.2022 	14:50:35 	lx 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe4,:_lx_atExe5
 - result _lx_atExe1 size: 4062, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	7.1.2022 	14:50:36 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00948
  
SELECT pr.product_id, pr.transfer_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.info, pr.record_id
 FROM product pr
 WHERE pr.product_id <> ''
 ORDER BY pr.product_id. 	7.1.2022 	14:50:36 	lx 	(5. Tcp Server 2)

 -- tcp answer 1, send result: -1, send count: 1, loop count: 1, bytes sent 81660 / 231837 remaining, total send time 1 µs. 	7.1.2022 	14:50:36 	lx 	(5. Tcp Server 2)

 -- tcp answer 1, send result: -1, send count: 2, loop count: 3, bytes sent 163320 / 150177 remaining, total send time 1232 µs. 	7.1.2022 	14:50:36 	lx 	(5. Tcp Server 2)

 -- tcp answer 1, send count: 4, loop count: 5, bytes sent 326640 / -13143 remaining, total send time 2470 µs. 	7.1.2022 	14:50:36 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	7.1.2022 	14:50:43 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	7.1.2022 	14:50:44 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	7.1.2022 	14:50:44 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

Record is not loaded for table: Sales Order Row ([Sales Order Row]Product id). 	7.1.2022 	14:53:48 	_fld VALUE 	(6. tbl_ 5)

Record is not loaded for table: Sales Order Row ([Sales Order Row]Product id). 	7.1.2022 	14:54:04 	_fld VALUE 	(6. tbl_ 5)

Record is not loaded for table: Sales Order Row ([Sales Order Row]Product id). 	7.1.2022 	14:55:33 	_fld VALUE 	(6. tbl_ 5)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	7.1.2022 	15:03:22 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 72, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	7.1.2022 	15:03:22 	lx 	(5. Tcp Server 2)

closing socket '72'. 	7.1.2022 	15:03:22 	lx 	(5. Tcp Server 2)

*** tcp close for sock 73, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	7.1.2022 	15:03:22 	lx 	(5. Tcp Server 2)

closing socket '73'. 	7.1.2022 	15:03:22 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          4
poll.fd_count:        1
pollCount:            33816
pollInCount:          5
pollOutCount:         0
pollCloseCount:       0
pollErrCount:         0
fd add/remove count:  3/2
totalBytesReceived:   4031
totalBytesSent:       84092. 	7.1.2022 	15:03:22 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 77
. 	7.1.2022 	15:03:22 	lx 	(5. Tcp Server 2)

closing socket '77'. 	7.1.2022 	15:03:22 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x0173cc6770. 	7.1.2022 	15:03:22 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0173cc6770, size: 400. 	7.1.2022 	15:03:22 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	7.1.2022 	15:03:22 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0173cc6770. 	7.1.2022 	15:03:23 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	7.1.2022 	15:03:23 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	7.1.2022 	15:03:28 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

  database connect time: 0.0002 seconds. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0173ce6a70, size: 400. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - system/4d.json. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

--- server started in 0.0018 seconds, 2022-01-07 15:03:30, used memory 2998.5 kb --- 	 5. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	7.1.2022 	15:03:30 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-07 15:03:47
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 758
Content-Uncompressed-Length: 1113

LZ4. 	7.1.2022 	15:03:47 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	7.1.2022 	15:03:47 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	7.1.2022 	15:03:47 	lx 	(5. Tcp Server 2)

  database connect time: 0.0001 seconds. 	7.1.2022 	15:03:47 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	7.1.2022 	15:03:47 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	7.1.2022 	15:03:47 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00144
  
SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id
 FROM invoice inv
 WHERE inv.invoice_id <> ''
 ORDER BY inv.invoice_id. 	7.1.2022 	15:03:47 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	7.1.2022 	15:04:37 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 73, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	7.1.2022 	15:04:38 	lx 	(5. Tcp Server 2)

closing socket '73'. 	7.1.2022 	15:04:38 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	7.1.2022 	15:04:38 	lx 	(5. Tcp Server 2)

closing socket '77'. 	7.1.2022 	15:04:38 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          1
poll.fd_count:        2
pollCount:            2968
pollInCount:          3
pollOutCount:         0
pollCloseCount:       0
pollErrCount:         0
fd add/remove count:  4/2
totalBytesReceived:   1029
totalBytesSent:       810. 	7.1.2022 	15:04:38 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 89
. 	7.1.2022 	15:04:38 	lx 	(5. Tcp Server 2)

closing socket '89'. 	7.1.2022 	15:04:38 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 88
. 	7.1.2022 	15:04:38 	lx 	(5. Tcp Server 2)

closing socket '88'. 	7.1.2022 	15:04:38 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x0173ce6a70. 	7.1.2022 	15:04:38 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0173ce6a70, size: 400. 	7.1.2022 	15:04:38 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	7.1.2022 	15:04:38 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0173ce6a70. 	7.1.2022 	15:04:38 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	7.1.2022 	15:04:38 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	7.1.2022 	15:04:42 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	7.1.2022 	15:04:43 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	7.1.2022 	15:04:43 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	7.1.2022 	15:04:43 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	7.1.2022 	15:04:43 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	7.1.2022 	15:04:43 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	7.1.2022 	15:04:43 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	7.1.2022 	15:04:43 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	7.1.2022 	15:04:43 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	7.1.2022 	15:04:43 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0163a5f5a0, size: 400. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - system/4d.json. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

warning: TLS listen did not start: 'unable to set TLS certificate file '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem', content:
'''
. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

--- server started in 0.0020 seconds, 2022-01-07 15:04:44, used memory 2994.3 kb --- 	 5. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	7.1.2022 	15:04:44 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-07 15:05:05
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 749
Content-Uncompressed-Length: 1113

LZ4. 	7.1.2022 	15:05:05 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	7.1.2022 	15:05:05 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	7.1.2022 	15:05:05 	lx 	(5. Tcp Server 2)

  database connect time: 0.0005 seconds. 	7.1.2022 	15:05:05 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	7.1.2022 	15:05:05 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	7.1.2022 	15:05:05 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00167
  
SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id
 FROM invoice inv
 WHERE inv.invoice_id <> ''
 ORDER BY inv.invoice_id. 	7.1.2022 	15:05:05 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	7.1.2022 	15:09:00 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 77, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	7.1.2022 	15:09:00 	lx 	(5. Tcp Server 2)

closing socket '77'. 	7.1.2022 	15:09:00 	lx 	(5. Tcp Server 2)

*** tcp close for sock 88, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	7.1.2022 	15:09:00 	lx 	(5. Tcp Server 2)

closing socket '88'. 	7.1.2022 	15:09:00 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          1
poll.fd_count:        1
pollCount:            11392
pollInCount:          2
pollOutCount:         0
pollCloseCount:       0
pollErrCount:         0
fd add/remove count:  3/2
totalBytesReceived:   1020
totalBytesSent:       811. 	7.1.2022 	15:09:00 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 89
. 	7.1.2022 	15:09:00 	lx 	(5. Tcp Server 2)

closing socket '89'. 	7.1.2022 	15:09:00 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x0163a5f5a0. 	7.1.2022 	15:09:00 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0163a5f5a0, size: 400. 	7.1.2022 	15:09:00 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	7.1.2022 	15:09:00 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0163a5f5a0. 	7.1.2022 	15:09:00 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	7.1.2022 	15:09:00 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	7.1.2022 	15:09:05 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

  database connect time: 0.0005 seconds. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0163a5f5a0, size: 400. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - system/4d.json, demo-fi_demo-0 - table/prf/field_type.json. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

warning: TLS listen did not start: 'unable to set TLS certificate file '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem', content:
'''
. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

--- server started in 0.0018 seconds, 2022-01-07 15:09:06, used memory 2998.4 kb --- 	 5. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	7.1.2022 	15:09:06 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-07 15:10:32
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 749
Content-Uncompressed-Length: 1113

LZ4. 	7.1.2022 	15:10:32 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	7.1.2022 	15:10:32 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	7.1.2022 	15:10:32 	lx 	(5. Tcp Server 2)

  database connect time: 0.0010 seconds. 	7.1.2022 	15:10:32 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	7.1.2022 	15:10:32 	lx 	(5. Tcp Server 2)

option - plg4d execute = {
 ["database"] = "plg4d";
 ["field_type"] = {
  [1] = "string";
  [2] = "string";
  [3] = "integer";
  [4] = "string";
  [5] = "string";
  [6] = "date";
  [7] = "number";
  [8] = "number";
  [9] = "string";
  [10] = "string";
  [11] = "string";
  [12] = "string";
  [13] = "string";
 };
 ["sql"] = "SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id\
 FROM invoice inv\
 WHERE inv.invoice_id <> ''\
 ORDER BY inv.invoice_id";
 ["field"] = {
  [1] = "inv.invoice_id";
  [2] = "inv.customer_project";
  [3] = "inv.state";
  [4] = "inv.our_reference";
  [5] = "inv.company_id";
  [6] = "inv.date_";
  [7] = "inv.price_total";
  [8] = "inv.vat_total";
  [9] = "inv.currency_id";
  [10] = "inv.terms_of_payment_id";
  [11] = "inv.your_reference";
  [12] = "inv.invoice_text";
  [13] = "inv.record_id";
 };
 ["show_sql"] = true;
 ["query_name"] = "new:form/nc/erp-sync/query/order-invoice.json";
 ["table_prefix"] = "ord";
};. 	7.1.2022 	15:10:32 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	7.1.2022 	15:10:32 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00251
  
SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id
 FROM invoice inv
 WHERE inv.invoice_id <> ''
 ORDER BY inv.invoice_id. 	7.1.2022 	15:10:32 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	7.1.2022 	15:14:27 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 88, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	7.1.2022 	15:14:27 	lx 	(5. Tcp Server 2)

closing socket '88'. 	7.1.2022 	15:14:27 	lx 	(5. Tcp Server 2)

*** tcp close for sock 89, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	7.1.2022 	15:14:27 	lx 	(5. Tcp Server 2)

closing socket '89'. 	7.1.2022 	15:14:27 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          1
poll.fd_count:        2
pollCount:            14320
pollInCount:          3
pollOutCount:         0
pollCloseCount:       0
pollErrCount:         0
fd add/remove count:  4/2
totalBytesReceived:   1020
totalBytesSent:       811. 	7.1.2022 	15:14:27 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 91
. 	7.1.2022 	15:14:27 	lx 	(5. Tcp Server 2)

closing socket '91'. 	7.1.2022 	15:14:27 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 90
. 	7.1.2022 	15:14:27 	lx 	(5. Tcp Server 2)

closing socket '90'. 	7.1.2022 	15:14:27 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x0163a5f5a0. 	7.1.2022 	15:14:27 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0163a5f5a0, size: 400. 	7.1.2022 	15:14:27 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	7.1.2022 	15:14:27 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0163a5f5a0. 	7.1.2022 	15:14:27 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	7.1.2022 	15:14:27 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	7.1.2022 	15:14:29 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0166ffb370, size: 400. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/4d.json, demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/option.json. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

warning: TLS listen did not start: 'unable to set TLS certificate file '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem', content:
'''
. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

--- server started in 0.0022 seconds, 2022-01-07 15:14:31, used memory 2994.5 kb --- 	 5. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	7.1.2022 	15:14:31 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-07 15:14:54
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 756
Content-Uncompressed-Length: 1113

LZ4. 	7.1.2022 	15:14:54 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	7.1.2022 	15:14:54 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	7.1.2022 	15:14:54 	lx 	(5. Tcp Server 2)

  database connect time: 0.0002 seconds. 	7.1.2022 	15:14:54 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	7.1.2022 	15:14:54 	lx 	(5. Tcp Server 2)

option - plg4d execute = {
 ["database"] = "plg4d";
 ["table_prefix"] = "ord";
 ["field_type"] = {
  [1] = "string";
  [2] = "string";
  [3] = "integer";
  [4] = "string";
  [5] = "string";
  [6] = "date";
  [7] = "number";
  [8] = "number";
  [9] = "string";
  [10] = "string";
  [11] = "string";
  [12] = "string";
  [13] = "string";
 };
 ["sql"] = "SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id\
 FROM invoice inv\
 WHERE inv.invoice_id <> ''\
 ORDER BY inv.invoice_id";
 ["show_sql"] = true;
 ["field"] = {
  [1] = "inv.invoice_id";
  [2] = "inv.customer_project";
  [3] = "inv.state";
  [4] = "inv.our_reference";
  [5] = "inv.company_id";
  [6] = "inv.date_";
  [7] = "inv.price_total";
  [8] = "inv.vat_total";
  [9] = "inv.currency_id";
  [10] = "inv.terms_of_payment_id";
  [11] = "inv.your_reference";
  [12] = "inv.invoice_text";
  [13] = "inv.record_id";
 };
 ["query_name"] = "new:form/nc/erp-sync/query/order-invoice.json";
};. 	7.1.2022 	15:14:54 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	7.1.2022 	15:14:55 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00162
  
SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id
 FROM invoice inv
 WHERE inv.invoice_id <> ''
 ORDER BY inv.invoice_id. 	7.1.2022 	15:14:55 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	7.1.2022 	15:15:39 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 89, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	7.1.2022 	15:15:39 	lx 	(5. Tcp Server 2)

closing socket '89'. 	7.1.2022 	15:15:39 	lx 	(5. Tcp Server 2)

*** tcp close for sock 90, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	7.1.2022 	15:15:39 	lx 	(5. Tcp Server 2)

closing socket '90'. 	7.1.2022 	15:15:39 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          1
poll.fd_count:        1
pollCount:            3032
pollInCount:          2
pollOutCount:         0
pollCloseCount:       0
pollErrCount:         0
fd add/remove count:  3/2
totalBytesReceived:   1027
totalBytesSent:       803. 	7.1.2022 	15:15:39 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 91
. 	7.1.2022 	15:15:39 	lx 	(5. Tcp Server 2)

closing socket '91'. 	7.1.2022 	15:15:39 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x0166ffb370. 	7.1.2022 	15:15:39 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0166ffb370, size: 400. 	7.1.2022 	15:15:39 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	7.1.2022 	15:15:39 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0166ffb370. 	7.1.2022 	15:15:39 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	7.1.2022 	15:15:39 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	7.1.2022 	15:15:42 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

  database connect time: 0.0004 seconds. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0170335980, size: 400. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/4d.json, demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/option.json. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

warning: TLS listen did not start: 'unable to set TLS certificate file '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem', content:
'''
. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

--- server started in 0.0020 seconds, 2022-01-07 15:15:43, used memory 2998.3 kb --- 	 5. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	7.1.2022 	15:15:43 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-07 15:15:52
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 756
Content-Uncompressed-Length: 1113

LZ4. 	7.1.2022 	15:15:52 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	7.1.2022 	15:15:52 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	7.1.2022 	15:15:52 	lx 	(5. Tcp Server 2)

  database connect time: 0.0002 seconds. 	7.1.2022 	15:15:52 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	7.1.2022 	15:15:52 	lx 	(5. Tcp Server 2)

option - plg4d execute = {
 ["database"] = "plg4d";
 ["query_name"] = "new:form/nc/erp-sync/query/order-invoice.json";
 ["table_prefix"] = "ord";
 ["field"] = {
  [1] = "inv.invoice_id";
  [2] = "inv.customer_project";
  [3] = "inv.state";
  [4] = "inv.our_reference";
  [5] = "inv.company_id";
  [6] = "inv.date_";
  [7] = "inv.price_total";
  [8] = "inv.vat_total";
  [9] = "inv.currency_id";
  [10] = "inv.terms_of_payment_id";
  [11] = "inv.your_reference";
  [12] = "inv.invoice_text";
  [13] = "inv.record_id";
 };
 ["field_type"] = {
  [1] = "string";
  [2] = "string";
  [3] = "integer";
  [4] = "string";
  [5] = "string";
  [6] = "date";
  [7] = "number";
  [8] = "number";
  [9] = "string";
  [10] = "string";
  [11] = "string";
  [12] = "string";
  [13] = "string";
 };
 ["sql"] = "SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id\
 FROM invoice inv\
 WHERE inv.invoice_id <> ''\
 ORDER BY inv.invoice_id";
 ["show_sql"] = true;
};. 	7.1.2022 	15:15:52 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	7.1.2022 	15:15:53 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00139
  
SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id
 FROM invoice inv
 WHERE inv.invoice_id <> ''
 ORDER BY inv.invoice_id. 	7.1.2022 	15:15:53 	lx 	(5. Tcp Server 2)

option - plg4d execute = {
 ["database"] = "plg4d";
 ["query_name"] = "new:form/nc/erp-sync/query/order-invoice.json";
 ["table_prefix"] = "ord";
 ["field"] = {
  [1] = "inv.invoice_id";
  [2] = "inv.customer_project";
  [3] = "inv.state";
  [4] = "inv.our_reference";
  [5] = "inv.company_id";
  [6] = "inv.date_";
  [7] = "inv.price_total";
  [8] = "inv.vat_total";
  [9] = "inv.currency_id";
  [10] = "inv.terms_of_payment_id";
  [11] = "inv.your_reference";
  [12] = "inv.invoice_text";
  [13] = "inv.record_id";
 };
 ["field_type"] = {
  [1] = "string";
  [2] = "string";
  [3] = "integer";
  [4] = "string";
  [5] = "string";
  [6] = "date";
  [7] = "number";
  [8] = "number";
  [9] = "string";
  [10] = "string";
  [11] = "string";
  [12] = "string";
  [13] = "string";
 };
 ["sql"] = "SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id\
 FROM invoice inv\
 WHERE inv.invoice_id <> ''\
 ORDER BY inv.invoice_id";
 ["show_sql"] = true;
};. 	7.1.2022 	15:15:54 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	7.1.2022 	15:15:54 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

option - plg4d execute = {
 ["database"] = "plg4d";
 ["query_name"] = "new:form/nc/erp-sync/query/order-invoice.json";
 ["table_prefix"] = "ord";
 ["field"] = {
  [1] = "inv.invoice_id";
  [2] = "inv.customer_project";
  [3] = "inv.state";
  [4] = "inv.our_reference";
  [5] = "inv.company_id";
  [6] = "inv.date_";
  [7] = "inv.price_total";
  [8] = "inv.vat_total";
  [9] = "inv.currency_id";
  [10] = "inv.terms_of_payment_id";
  [11] = "inv.your_reference";
  [12] = "inv.invoice_text";
  [13] = "inv.record_id";
 };
 ["field_type"] = {
  [1] = "string";
  [2] = "string";
  [3] = "integer";
  [4] = "string";
  [5] = "string";
  [6] = "date";
  [7] = "number";
  [8] = "number";
  [9] = "string";
  [10] = "string";
  [11] = "string";
  [12] = "string";
  [13] = "string";
 };
 ["sql"] = "SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id\
 FROM invoice inv\
 WHERE inv.invoice_id <> ''\
 ORDER BY inv.invoice_id";
 ["show_sql"] = true;
};. 	7.1.2022 	15:15:58 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	7.1.2022 	15:15:58 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	7.1.2022 	15:32:06 	lx 	(5. Tcp Server 2)

closing socket '92'. 	7.1.2022 	15:32:06 	lx 	(5. Tcp Server 2)

*** tcp close for sock 93, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 1 027 bytes ***. 	7.1.2022 	15:32:06 	lx 	(5. Tcp Server 2)

closing socket '93'. 	7.1.2022 	15:32:06 	lx 	(5. Tcp Server 2)

Trying to get new record uuid for table Invoice Row. 	7.1.2022 	15:36:17 	_rec SAVE 	(6. tbl_ 5)

Record is not loaded for table: Sales Order Row ([Sales Order Row]Product id). 	7.1.2022 	15:37:52 	_fld VALUE 	(13. tbl_ 12)

*** tcp close for sock 92, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	7.1.2022 	16:34:24 	lx 	(5. Tcp Server 2)

closing socket '92'. 	7.1.2022 	16:34:24 	lx 	(5. Tcp Server 2)

*** tcp close for sock 90, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	7.1.2022 	23:59:41 	lx 	(5. Tcp Server 2)

closing socket '90'. 	7.1.2022 	23:59:41 	lx 	(5. Tcp Server 2)

*** tcp close for sock 91, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	7.1.2022 	23:59:41 	lx 	(5. Tcp Server 2)

closing socket '91'. 	7.1.2022 	23:59:41 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          3
poll.fd_count:        0
pollCount:            966960
pollInCount:          6
pollOutCount:         0
pollCloseCount:       3
pollErrCount:         0
fd add/remove count:  5/5
totalBytesReceived:   3081
totalBytesSent:       2408. 	7.1.2022 	23:59:41 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	7.1.2022 	23:59:41 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0170335980. 	7.1.2022 	23:59:41 	lx 	(5. Tcp Server 2)

